import { similarQuestionDelete, similarlibQuestionDelete } from '@/services/similarExt';

export async function deleteSimilarQuestion(similarData, similarlibData, similarType) {
  if (similarType == '1') {
    if (similarData.length > 0) {
      const ids = similarData.map(item => item.id);
      return similarQuestionDelete({ ids });
    }
  } else if (similarlibData.length > 0) {
    const ids = similarlibData.map(item => item.id);
    return similarlibQuestionDelete({ ids });
  }
}

export default {
  deleteSimilarQuestion,
};
